package br.unb.validator;


public class Valida {
	public void Verifica(String nome,String cpf,String email) throws MyException{
		char[] array;
		array = cpf.toCharArray();
		
		if(array.length != 14){
			throw new MyException("O CPF deve ter 14 caracteres");
		}
		if(array[3] != '.' || array[7] != '.' || array[11] != '-'){
			throw new MyException("O CPF deve estar no formato 999.999.991-99");
		}
		if(!email.contains("@")){
			throw new MyException("Email invalido.");
		}
	}

}
